package com.wkp.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.wkp.bean.Server;

/**
 * 服务器监控
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/serverController")
public class ServerController {
	// 添加slf4j日志实例对象
	private final static Logger logger = LoggerFactory.getLogger(Server.class);
	@RequestMapping(value = "/server",method = RequestMethod.GET)
	public ModelAndView server(ModelMap mmap) throws Exception {
		
		logger.info("访问成功："+"/serverController/server");
		Server server = new Server();
		server.copyTo();
		ModelAndView mv = new ModelAndView("/server/server");
		mv.addObject("server",server);
		return mv;
	}
}
